package com.mp.approvalreq.entity.dto;


import java.util.Objects;

public class TemplateInfoDTO {

    private Integer templateId;

    /**
     * 审模板类型
     */
    private Integer defaultType;
    /**
     * 模板已使用次数
     */
    private Integer templateUsedTimes;
    /**
     * 该公司的该模板类型是否已存在适用范围为全公司的模板
     */
    private Integer existCompanyRangeTemplate;

    /**
     * 数据库模板组件JSONString
     */
    private String templateComponentStr;

    /**
     * 是否加班时长计入调休时长
     */
    private Integer switchOnDaysOff;

    /**
     * 模板适用范围
     */
    private String companyInfoIdRange;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 作废时间
     */
    private String disableTime;

    public TemplateInfoDTO() {
    }

    public Integer getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    public Integer getDefaultType() {
        return defaultType;
    }

    public void setDefaultType(Integer defaultType) {
        this.defaultType = defaultType;
    }

    public Integer getTemplateUsedTimes() {
        return templateUsedTimes;
    }

    public void setTemplateUsedTimes(Integer templateUsedTimes) {
        this.templateUsedTimes = templateUsedTimes;
    }

    public Integer getExistCompanyRangeTemplate() {
        return existCompanyRangeTemplate;
    }

    public void setExistCompanyRangeTemplate(Integer existCompanyRangeTemplate) {
        this.existCompanyRangeTemplate = existCompanyRangeTemplate;
    }

    public String getTemplateComponentStr() {
        return templateComponentStr;
    }

    public void setTemplateComponentStr(String templateComponentStr) {
        this.templateComponentStr = templateComponentStr;
    }

    public Integer getSwitchOnDaysOff() {
        return switchOnDaysOff;
    }

    public void setSwitchOnDaysOff(Integer switchOnDaysOff) {
        this.switchOnDaysOff = switchOnDaysOff;
    }

    public String getCompanyInfoIdRange() {
        return companyInfoIdRange;
    }

    public void setCompanyInfoIdRange(String companyInfoIdRange) {
        this.companyInfoIdRange = companyInfoIdRange;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getDisableTime() {
        return disableTime;
    }

    public void setDisableTime(String disableTime) {
        this.disableTime = disableTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TemplateInfoDTO that = (TemplateInfoDTO) o;
        return Objects.equals(templateId, that.templateId) &&
         Objects.equals(defaultType, that.defaultType) &&
         Objects.equals(templateUsedTimes, that.templateUsedTimes) &&
         Objects.equals(existCompanyRangeTemplate, that.existCompanyRangeTemplate) &&
         Objects.equals(templateComponentStr, that.templateComponentStr) &&
         Objects.equals(switchOnDaysOff, that.switchOnDaysOff) &&
         Objects.equals(companyInfoIdRange, that.companyInfoIdRange) &&
         Objects.equals(createTime, that.createTime) &&
         Objects.equals(disableTime, that.disableTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(templateId, defaultType, templateUsedTimes, existCompanyRangeTemplate, templateComponentStr, switchOnDaysOff, companyInfoIdRange, createTime, disableTime);
    }

    @Override
    public String toString() {
        return "TemplateInfoDTO{" +
         "templateId=" + templateId +
         ", defaultType=" + defaultType +
         ", templateUsedTimes=" + templateUsedTimes +
         ", existCompanyRangeTemplate=" + existCompanyRangeTemplate +
         ", templateComponentStr='" + templateComponentStr + '\'' +
         ", switchOnDaysOff=" + switchOnDaysOff +
         ", companyInfoIdRange='" + companyInfoIdRange + '\'' +
         ", createTime='" + createTime + '\'' +
         ", disableTime='" + disableTime + '\'' +
         '}';
    }
}
